'use strict';

module.exports = app => {
  const {
    STRING,
    INTEGER,
    ENUM
  } = app.Sequelize;

  const User = app.model.define('user', {
    user_id: {
      type: INTEGER,
      primaryKey: true,
      autoIncrement: true
    },
    username: STRING,
    password: STRING,
    auth: STRING,
    lock: ENUM('0', '1'),
    created_at: {
      type: INTEGER
    },
    updated_at: {
      type: INTEGER
    }
  });

  return User;
};